package com.cyanite.playlv2.util;

import com.cyanite.playlv2.PreferenceActivity;
import com.cyanite.playlv2.R;

import android.content.Context;
import android.content.Intent;
import android.view.Menu;

/**
 * Collection of common functions which are called from the menu
 * 
 */
public class MenuUtils {
    // Common menu items
    private static final int MENU_PREFERENCES = -1;

    private static final int MENU_GROUP_SYSTEM = 20;

    public static void addPreferencesToMenu(Context context, Menu menu) {
        Intent intent = new Intent(context, PreferenceActivity.class);
        menu.add(MENU_GROUP_SYSTEM, MENU_PREFERENCES, Menu.CATEGORY_SECONDARY,
                R.string.preferences_label).setIcon(R.drawable.ic_menu_preferences).setIntent(
                intent);
    }
}
